home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / RCS / Fs_Select.c,v < prev    next >
Encoding:
Text File  |  1991-12-09  |  2.8 KB  |  124 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.2.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.2
  10. date     88.06.21.11.17.08;  author ouster;  state Exp;
  11. branches 1.2.1.1;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     88.06.19.14.29.12;  author ouster;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19. 1.2.1.1
  20. date     91.12.08.17.05.16;  author kupfer;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @@
  27.  
  28.  
  29. 1.2
  30. log
  31. @Must include status.h.
  32. @
  33. text
  34. @/* 
  35.  * Fs_Select.c --
  36.  *
  37.  *    Source code for the Fs_Select library procedure.
  38.  *
  39.  * Copyright 1988 Regents of the University of California
  40.  * Permission to use, copy, modify, and distribute this
  41.  * software and its documentation for any purpose and without
  42.  * fee is hereby granted, provided that the above copyright
  43.  * notice appear in all copies.  The University of California
  44.  * makes no representations about the suitability of this
  45.  * software for any purpose.  It is provided "as is" without
  46.  * express or implied warranty.
  47.  */
  48.  
  49. #ifndef lint
  50. static char rcsid[] = "$Header: Fs_Select.c,v 1.1 88/06/19 14:29:12 ouster Exp $ SPRITE (Berkeley)";
  51. #endif not lint
  52.  
  53. #include <sprite.h>
  54. #include <fs.h>
  55. #include <status.h>
  56.  
  57.  
  58. /*
  59.  *----------------------------------------------------------------------
  60.  *
  61.  * Fs_Select --
  62.  *
  63.  *      The "normal" Fs_Select interface for user code.  Waits a period of
  64.  *      time  indicated  by  *timeoutPtr for  I/O  to become possible on
  65.  *      any of the streams indicated by *readMaskPtr,  *writeMaskPtr and
  66.  *      *exceptMaskPtr.
  67.  *
  68.  * Results:
  69.  *    The result from Fs_RawSelect.
  70.  *
  71.  * Side effects:
  72.  *    None.
  73.  *
  74.  *----------------------------------------------------------------------
  75.  */
  76.  
  77. ReturnStatus
  78. Fs_Select(numStreams, timeoutPtr, readMaskPtr, writeMaskPtr,
  79.            exceptMaskPtr, numReadyPtr)
  80.  
  81.     int        numStreams;    /* # of bits in the read and write masks. */
  82.     Time    *timeoutPtr;    /* Timeout period or NULL. */
  83.     int        *readMaskPtr;    /* A bitmask indicating stream ID's to check
  84.                  * for readability. */
  85.     int        *writeMaskPtr;    /* A bitmask indicating stream ID's to check
  86.                  * for writability. */
  87.     int        *exceptMaskPtr;    /* A bitmask indicating stream ID's to check
  88.                  * for exception conditions. */
  89.     int        *numReadyPtr;    /* On return indicates the number of streams
  90.                  * ready for I/O. */
  91. {
  92.     ReturnStatus    status;
  93.  
  94.     do {
  95.     status = Fs_RawSelect(numStreams, timeoutPtr, readMaskPtr, writeMaskPtr,
  96.                exceptMaskPtr, numReadyPtr);
  97.     } while (status == GEN_ABORTED_BY_SIGNAL);
  98.     return(status);
  99. }
  100. @
  101.  
  102.  
  103. 1.2.1.1
  104. log
  105. @Initial branch for Sprite server.
  106. @
  107. text
  108. @d17 1
  109. a17 1
  110. static char rcsid[] = "$Header: /sprite/src/lib/c/syscall/RCS/Fs_Select.c,v 1.2 88/06/21 11:17:08 ouster Exp $ SPRITE (Berkeley)";
  111. @
  112.  
  113.  
  114. 1.1
  115. log
  116. @Initial revision
  117. @
  118. text
  119. @d17 1
  120. a17 1
  121. static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
  122. d22 1
  123. @
  124.